<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Kyoto Cabinet: kyotocabinet::CondVar Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Kyoto Cabinet
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a>      </li>
      <li class="navelem"><a class="el" href="classkyotocabinet_1_1CondVar.html">CondVar</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">kyotocabinet::CondVar Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="kyotocabinet::CondVar" -->
<p>Condition variable.  
 <a href="classkyotocabinet_1_1CondVar.html#details">More...</a></p>

<p><code>#include &lt;kcthread.h&gt;</code></p>

<p><a href="classkyotocabinet_1_1CondVar-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1CondVar.html#ab26f80626ff5b55365629a68be592b3e">CondVar</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#ab26f80626ff5b55365629a68be592b3e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1CondVar.html#aa9a6ae72fab7454c16a81ca1790c9e30">~CondVar</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#aa9a6ae72fab7454c16a81ca1790c9e30"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1CondVar.html#a57374e8d032ba00526a516b6e7e3218f">wait</a> (<a class="el" href="classkyotocabinet_1_1Mutex.html">Mutex</a> *mutex)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the signal.  <a href="#a57374e8d032ba00526a516b6e7e3218f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1CondVar.html#aeec95d1994700e3a6e704c54038a2bfd">wait</a> (<a class="el" href="classkyotocabinet_1_1Mutex.html">Mutex</a> *mutex, double sec)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for the signal.  <a href="#aeec95d1994700e3a6e704c54038a2bfd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1CondVar.html#a460512c8bd598b5cbd3955a07687bdb5">signal</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send the wake-up signal to another waiting thread.  <a href="#a460512c8bd598b5cbd3955a07687bdb5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1CondVar.html#a36c12c7fbf47e11d3a8447fb81cd39e0">broadcast</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send the wake-up signals to all waiting threads.  <a href="#a36c12c7fbf47e11d3a8447fb81cd39e0"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Condition variable. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab26f80626ff5b55365629a68be592b3e"></a><!-- doxytag: member="kyotocabinet::CondVar::CondVar" ref="ab26f80626ff5b55365629a68be592b3e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classkyotocabinet_1_1CondVar.html#ab26f80626ff5b55365629a68be592b3e">kyotocabinet::CondVar::CondVar</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a class="anchor" id="aa9a6ae72fab7454c16a81ca1790c9e30"></a><!-- doxytag: member="kyotocabinet::CondVar::~CondVar" ref="aa9a6ae72fab7454c16a81ca1790c9e30" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classkyotocabinet_1_1CondVar.html#aa9a6ae72fab7454c16a81ca1790c9e30">kyotocabinet::CondVar::~CondVar</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a57374e8d032ba00526a516b6e7e3218f"></a><!-- doxytag: member="kyotocabinet::CondVar::wait" ref="a57374e8d032ba00526a516b6e7e3218f" args="(Mutex *mutex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classkyotocabinet_1_1CondVar.html#a57374e8d032ba00526a516b6e7e3218f">kyotocabinet::CondVar::wait</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classkyotocabinet_1_1Mutex.html">Mutex</a> *&#160;</td>
          <td class="paramname"><em>mutex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Wait for the signal. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mutex</td><td>a locked mutex. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aeec95d1994700e3a6e704c54038a2bfd"></a><!-- doxytag: member="kyotocabinet::CondVar::wait" ref="aeec95d1994700e3a6e704c54038a2bfd" args="(Mutex *mutex, double sec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classkyotocabinet_1_1CondVar.html#a57374e8d032ba00526a516b6e7e3218f">kyotocabinet::CondVar::wait</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classkyotocabinet_1_1Mutex.html">Mutex</a> *&#160;</td>
          <td class="paramname"><em>mutex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sec</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Wait for the signal. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mutex</td><td>a locked mutex. </td></tr>
    <tr><td class="paramname">sec</td><td>the interval of the suspension in seconds. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on catched signal, or false on timeout. </dd></dl>

</div>
</div>
<a class="anchor" id="a460512c8bd598b5cbd3955a07687bdb5"></a><!-- doxytag: member="kyotocabinet::CondVar::signal" ref="a460512c8bd598b5cbd3955a07687bdb5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classkyotocabinet_1_1CondVar.html#a460512c8bd598b5cbd3955a07687bdb5">kyotocabinet::CondVar::signal</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send the wake-up signal to another waiting thread. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The mutex used for the wait method should be locked by the caller. </dd></dl>

</div>
</div>
<a class="anchor" id="a36c12c7fbf47e11d3a8447fb81cd39e0"></a><!-- doxytag: member="kyotocabinet::CondVar::broadcast" ref="a36c12c7fbf47e11d3a8447fb81cd39e0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classkyotocabinet_1_1CondVar.html#a36c12c7fbf47e11d3a8447fb81cd39e0">kyotocabinet::CondVar::broadcast</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send the wake-up signals to all waiting threads. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>The mutex used for the wait method should be locked by the caller. </dd></dl>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
